package com.igeekhome.wzgl.controller;

import com.igeekhome.wzgl.entity.HomePageEntity;
import com.igeekhome.wzgl.service.IHomePageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/homepage")
@CrossOrigin
public class HomePageController {
    @Autowired
    private IHomePageService HomePageService;
    @GetMapping("/search")
    public List<HomePageEntity> search(){
    return HomePageService.search();
    }

}
